<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>แก้ไขข้อมูลสมาชิก</title>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
body {
	background-color: #82AFFB;
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
</head>

 <script>
$(document).ready(function() {
$("#datepicker").datepicker({ dateFormat: "yy/mm/dd" }).val()
});
</script>
</head>

<body>
<?php
	$objConnect = mysql_connect("localhost","root","1234") or die("Error Connect to Database");
	$objDB = mysql_select_db("book_db");
	$strSQL=mysql_query("SET NAMES TIS620");
	$strSQL = "SELECT * FROM member WHERE MemID = '".$_GET["MemID"]."' ";
	$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
	$objResult = mysql_fetch_array($objQuery);
?>
<table width="1139" height="552" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="8"><img src="file:///G|/book/image/banner.jpg" width="1134" height="525" /></td>
  </tr>
  <tr>
    <td width="140" height="23"><img src="file:///G|/book/image/menuadmin1.jpg" width="140" height="40" /></td>
    <td width="140"><img src="file:///G|/book/image/menuadmin2.jpg" width="140" height="40" /></td>
    <td width="140"><img src="file:///G|/book/image/menuadmin3.jpg" width="140" height="40" /></td>
    <td width="140"><img src="file:///G|/book/image/menuadmin4.jpg" width="140" height="40" /></td>
    <td width="140"><img src="file:///G|/book/image/menuadmin5.jpg" width="140" height="40" /></td>
    <td width="140"><img src="file:///G|/book/image/menuadmin6.jpg" width="140" height="40" /></td>
    <td width="140"><img src="file:///G|/book/image/menuadmin7.jpg" width="140" height="40" /></td>
    <td width="140"><img src="file:///G|/book/image/menuadmin8.jpg" width="140" height="40" /></td>
  </tr>
  <tr>
    <td colspan="8"><form id="form1" name="form1" method="post" action="file:///G|/book/save_editmember.php?MemID=<?php echo $_GET["MemID"];?>">
       <table width="604" border="0" align="center">
        <tr>
            <td colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;แก้ไขข้อมูลสมาชิก</td>
          </tr>
        <tr>
          <td>รหัสสมาชิก</td>
          <td><label for="MemID"></label>
            <input type="text" name="MemID" id="MemID" value="<?php echo $objResult["MemID"];?>" /></td>
          </tr>
        <td>ชื่อ-นามสกุล</td>
          <td><input name="MemName" type="text" id="MemName" size="30" maxlength="70" value="<?php echo $objResult["MemName"];?>" />
            *</td>
          </tr>
        <tr>
          <td>ชื่อเล่น</td>
          <td><label for="MemNick"></label>
            <input type="text" name="MemNick" id="MemNick" value="<?php echo $objResult["MemNick"];?>"/></td>
          </tr>
        <tr>
          <td>ปี/เดือน/วัน เกิด</td>
          <td><label for="MemBirth"></label>
            <input type="text" name="MemBirth" id="datepicker" value="<?php echo $objResult["MemBirth"];?>" /></td>
          </tr>
        <tr>
          <td height="28">เลขบัตรประชาชน</td>
          <td><label for="MemNum"></label>
            <input name="MemNum" type="text" id="MemNum" maxlength="13" value="<?php echo $objResult["MemNum"];?>" /></td>
        </tr> 
        <tr>
          <td height="28">ที่อยู่</td>
          <td><textarea name="MemAddress" id="MemAddress" cols="30" rows="3"><?php echo $objResult["MemAddress"];?></textarea></td>
          </tr>
        <tr>
          <td height="28">เบอร์โทรศัพท์</td>
          <td><label for="MemTel"></label>
            <input type="text" name="MemTel" id="MemTel" value="<?php echo $objResult["MemTel"];?>" /></td>
          </tr>
        <tr>
          <td height="28">อีเมล์</td>
          <td><input type="text" name="MemEmail" id="MemEmail" value="<?php echo $objResult["MemEmail"];?>"/>
            *</td>
          </tr>
  <TD>ประเภทสมาชิก :</TD>
  <TD><p>
    <label for="MemType"></label>
    <input type="text" name="MemType" id="MemType" value="<?php echo $objResult["MemType"];?>" />
    <br />
  </p></TD>
</TR>
        <tr>
          <td height="28">&nbsp;</td>
          <td><input type="submit" name="Submit" id="Submit" value="ตกลง" />
            &nbsp;&nbsp;&nbsp;&nbsp;
            <input type="reset" name="Reset" id="Reset" value="ยกเลิก" />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
          </tr>
        </table>
      
    </form></td>
  </tr>
</table>
